package com.zyf.chapter02.creation.factory.DI;

import com.zyf.chapter02.creation.factory.DI.util.NoSuchBeanDefinitionException;
import com.zyf.chapter02.creation.factory.DI.util.RateLimiter;

/**
 * @author yifeng
 */
public class Demo {

    public static void main(String[] args) throws NoSuchBeanDefinitionException {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("beans.xml");
        RateLimiter rateLimter = (RateLimiter) applicationContext.getBean("rateLimter");
        rateLimter.test();
        // ...
    }
}
